import * as common from './common'

const url = {
	isQZUser: "/zgb/v1/home/isNewUser", //是否为轻筑用户
	getWorkbench: "/zgb/v2/home/getWorkbench", //获取工作台应用
	getRosterInfo: "/zgb/v2/home/getRosterInfo", //获取实名制人员相关信息
	getCurrentProject: "/zgb/v2/home/getCurrentProject", //获取当前项目信息
	getProjectList: "/zgb/v2/home/projectList", //获取项目列表
	getAttendanceList: "/zgb/v2/home/getAttendanceRecordList", //获取考勤记录
	getSalaryList: "/zgb/v2/home/getSalaryRecordList", //获取工资列表
	changeProject: "/zgb/v2/home/changeProject", //切换项目
	getLatestAttendanceRecord: "/zgb/v2/home/getLatestAttendanceRecord", //获取最新考勤记录
	getProjectAttendanceDaily: "/zgb/v2/home/getProjectAttendanceDaily", //获取项目单日考勤记录
	personnelInspection: "/zgb/v1/rosterInspection/personnelInspection", //人员巡检
	// getProjectList: "/zgb/v2/home/getProjectList", //获取项目列表
	// changeProject: "/zgb/v1/home/changeProject", //切换项目
	// getProjectList: "/zgb/v1/home/getProjectList", //获取项目列表
	// getRosterInfo: "/zgb/v1/home/getRosterInfo", //获取实名制人员相关信息
	// getAttendanceList: "/zgb/v1/home/getAttendanceRecordList", //获取考勤记录
}


const isQZUser = (data) => {
	return common.req(url.isQZUser, data, 'get');
}
const getWorkbench = (data) => {
	return common.req(url.getWorkbench, data, 'get');
}
const getRosterInfo = (data) => {
	return common.req(url.getRosterInfo, data, 'get');
}
const getCurrentProject = (data) => {
	return common.req(url.getCurrentProject, data, 'get', false, false);
}
const getProjectList = (data) => {
	return common.req(url.getProjectList, data);
}
const getAttendanceList = (data) => {
	return common.req(url.getAttendanceList, data);
}
const getSalaryList = (data) => {
	return common.req(url.getSalaryList, data);
}
const changeProject = (data) => {
	return common.req(url.changeProject, data, 'get');
}
const getLatestAttendanceRecord = (data) => {
	return common.req(url.getLatestAttendanceRecord, data);
}
const getProjectAttendanceDaily = (data) => {
	return common.req(url.getProjectAttendanceDaily, data, 'post', true);
}
const personnelInspection = (data) => {
	return common.req(url.personnelInspection, data, 'post', true, false);
}



export default {
	isQZUser,
	getWorkbench,
	getRosterInfo,
	getCurrentProject,
	getProjectList,
	getAttendanceList,
	getSalaryList,
	changeProject,
	getLatestAttendanceRecord,
	getProjectAttendanceDaily,
	personnelInspection
}